package com.hzdl.car.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzdl.car.bean.Log;
import com.hzdl.car.mapper.LogMapper;
import com.hzdl.car.service.LogService;
import com.hzdl.car.vo.LogVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServiceimpl implements LogService {
    @Autowired
    private LogMapper mapper;
    @Override
    public PageInfo<Log> findWhere(LogVo logVo) {
        PageHelper.startPage(logVo.getPage(),logVo.getLimit());
        List<Log> list = mapper.findWhere(logVo);
        return new PageInfo<>(list);
    }

    @Override
    public int add(LogVo logVo) {
        return mapper.add(logVo);
    }

    @Override
    public int delete(Integer id) {
        return mapper.delete(id);
    }
}
